Skip to content

fix: rely on quota to restrict file uploads#1494

Merged
icewind1991 merged 1 commit intomainfrom
relyOnQuotaOnly
Apr 29, 2026
Merged

fix: rely on quota to restrict file uploads#1494
icewind1991 merged 1 commit intomainfrom
relyOnQuotaOnly

Conversation

@solracsf
Copy link
Copy Markdown
Member

@solracsf solracsf commented Feb 21, 2026

Actually, when the Guest is created, a 0B quota is assigned.

$user->setQuota('0 B');

Additionally, user is also placed in a jail (PERMISSION_READ).

This breaks more things than it solves (if any) IMO:

#1060
#1088
#1091

This PR makes files uploads rely on quota:

  • Default, 0 B, no uploads are allowed (existing behavior remains unchanged)
  • If this is changed afterwards by an admin, uploads are allowed for that user (so this is not a global switch, but one that can be activated per guest)
  • Other restrictions (apps that can be accessed, etc) remains intact.

Main goal: let admins decide if Guests should or not be able to upload files.

Actually, even Quota assignment is broken because...it has no effect, as user is in a read-only jail... 😭

To test, just login as Guest to Talk, Deck and other apps and feel the pain with a lot of things broken!

Enjoy Nextcloud as Guest again once this patch is installed 💯

Fix #1060
Fix #1088
Fix #1091

@skjnldsv skjnldsv requested review from a team, ArtificialOwl, CarlSchwan, come-nc, leftybournes, nfebe and provokateurin and removed request for a team February 23, 2026 09:27
Copy link
Copy Markdown
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me, but I think this needs some approval from @sorbaugh or @AndyScherzinger, because it might be something we don't want to change.

@CarlSchwan
Copy link
Copy Markdown
Member

Make sense to me too

@CarlSchwan

This comment was marked as resolved.

@solracsf

This comment was marked as resolved.

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

# Conflicts:
#	lib/Listener/BeforeFileSystemSetupListener.php
@icewind1991 icewind1991 merged commit 0eb7339 into main Apr 29, 2026
53 checks passed
@icewind1991 icewind1991 deleted the relyOnQuotaOnly branch April 29, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

4 participants